<?php 
if( !defined('IN') )
	define('IN', TRUE);

	require_once 'common.php';
	
	$tabdata = $enchersObj->getEncheresAvenir();
	if(!empty($tabdata)){
		foreach ($tabdata as $data) {
			$data['pc']=$data['limite']==0?'b':'';
			if( !isset($data['ae']) || $data['ae'] == 0 ) $data['ae'] = 'b';
				$data['AE'] = 'AE';
			if(!empty($data['images'])){
			   $data['images'] = array_shift(explode(';', $data['images']));
			}
			$val = $data['retime'];
			$data['retime'] =( $val == 60?'1min':($val == 120?'2min':($val == 300?'5min':$val.'s')));
?>
	<div class="venir">
        <div class="icons">
            <div class="icon">
                <span class="rt"><?php  echo $data['retime']; ?></span>
            </div>
            <div class="icon">
                <span class="pc<?php  echo $data['pc']; ?>"><?php  echo $data['limite']; ?>%</span>
            </div>
            <div class="icon">
                <span class="ae<?php  echo $data['ae']; ?>"><?php  echo $data['AE']; ?></span>
            </div>
        </div>
        <div class="content-img">
            <div class="titre"><?php  echo $data['nom']; ?></div>
            <div class="image">
                <a href="detail-product-<?php  echo $data['id']; ?>.html">
                    <img src="<?php  echo _UPLOAD_DIR_ ?>encheres/small<?php  echo $data['images']; ?>" alt="<?php  echo $data['nom']; ?>" title="<?php  echo $data['nom']; ?>" />
                </a>
            </div>
            <div class="clear"></div>
        </div>
        <div class="temps">
            <div class="txt-venir"><?php echo _BECOME_ ?></div>
        </div>
    </div>
<?php }
	}else echo '<div class="venir"><p>'._AUCUNE_ENCHERE_AVENIR_.'</p></div>';
?>